<?php

namespace pc\controllers;
use pc\controllers\BaseController;
use \Yii;

class FuckController extends BaseController
{
    public function actionIndex()
    {
        $data = Yii::$app->db->createCommand('SELECT images FROM gtw_asxao where id > 0 limit 3000')->queryAll();
        $redis = Yii::$app->get('redis');
        $redis->select(6);
        if(!empty($data)){
             foreach ($data as $images){
                 $images  = json_decode($images['images'],true);
                 if(!empty($images)){
                     foreach ($images as $image){
                         $redis->lpush('asxaoImgs','http://www.asxao.com'.$image);
                     }
                 }
             }
        }
        echo 'ok';
    }
}